package com.yukefms.rule.state;

import com.yukefms.engine.running.EventCode;
import com.yukefms.engine.running.RunningContext;
import com.yukefms.jointpoint.BodyPointCloud;
import com.yukefms.rule.interfaces.BARule;
import com.yukefms.rule.interfaces.BAStageRule;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

/**
 * @Description
 * @Author Ping
 * @Date 2021/6/29 10:25
 **/
public class FailedState extends BARuleState {
    public static Logger logger = LogManager.getLogger(FailedState.class);

    public FailedState(final BAStageRule relatedRule) {
        super(relatedRule);
    }
    @Override
    public void doReaction(BodyPointCloud pointCloud, RunningContext context) {
        //context.updateScore(relatedRule.successScore());
        logger.info("SORRY, the action of RULE-{} was performed in FAILED. ", relatedRule.ruleName()) ;
//        context.notifyRunningEventListener(EventCode.FAILED, relatedRule.ruleName());
    }

}
